<?php
include("Seguridad/seguridad_ad.php");
?>
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="utf-8" />
    <title>Control Escolar CBTa 87</title>
    <link rel="stylesheet" href="../css/styles.css" type="text/css" />
    <link rel="shortcut icon" href="../imagenes/cbta.ico">
	<link rel="stylesheet" href="../css/estilo_frm.css" type="text/css" />
    <script type="text/javascript" src="../jquery/jquery.js"></script>
    <script type="text/javascript" src="../jquery/modernizr.js"></script>
	<script type="text/javascript" src="../jquery/jquery-1.2.6.min.js"></script>
	<script language="javascript" src="../jquery/jquery.validate.js"></script> 
	<script type="text/javascript" language="javascript"> 
		$(document).ready(function(){ 
		   $("#frm_subir").validate({ 
			  rules: { 
				 txt_pass_actual: { 
					required: true,
				 },
				 txt_new_pass: { 
            		required: true, 	
        		 },
				 txt_new_passR: { 
            		required: true, 
					equalTo: "#txt_new_pass",
        		 }
			  }, 
			  messages: { 
				 txt_pass_actual: { 
					required: "*", 
				 },
				 txt_new_pass: { 
					required: "*", 
				 },
				 txt_new_passR: { 
					required: "*",
					equalTo: "*Los campos no coinciden", 
				 }            
			  }              
		   }); 
		});       
		</script>    
</head>

<body>
	<div id="pagina">
        <header>
        	<table id="Tabla_01" width="960" height="160" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<img src="../imagenes/header_F_01.gif" width="160" height="160" alt=""></td>
		<td>
			<img src="../imagenes/header_F_02.gif" width="160" height="160" alt=""></td>
		<td>
			<img src="../imagenes/header_F_03.gif" width="160" height="160" alt=""></td>
		<td>
			<img src="../imagenes/header_F_04.gif" width="160" height="160" alt=""></td>
		<td>
			<img src="../imagenes/header_F_05.gif" width="160" height="160" alt=""></td>
		<td>
			<img src="../imagenes/header_F_06.gif" width="160" height="160" alt=""></td>
	</tr>
</table>    
        </header>
        <div id="content">
            <nav>
            	<div id="tabsI">
                    <ul>
                        <li><a href="subir_datos.php">Subir calificaciones</a></li>
                        <li class="current"><a href="cambiar_password.php">Cambiar contrase&ntilde;a</a></li>
                        <li><a href="Seguridad/salir_ad.php">Cerrar Sesion</a></li>
                    </ul>                   
				</div>                                                
            </nav>            
            <div id="mainContent">
                <br/><br/><br/>
                    <h3 class="centr">Cambiar contrase&ntilde;a</h3><br/>
            <aside>
            </aside>
            <section>                
                <article>                
                	<form id="frm_subir" action="new_pass.php" action="procesar_sql.php" method="post">
                        	<label class="label_frm_new">Contrase&ntilde;a actual: </label>
                            <input type="password" name="txt_pass_actual" id="txt_pass_actual"  class="required"/><br/>
                            <label class="label_frm_new">Nueva contrase&ntilde;a: </label>
                            <input type="password" name="txt_new_pass" id="txt_new_pass" class="required" /><br/>
                            <label class="label_frm_new">Verifica nueva Contrase&ntilde;a actual: </label>
                            <input type="password" name="txt_new_passR" id="txt_new_passR" class="required" />
							<br/><br/> 
                            <input type="submit" class="btn_subir" value="Cambiar contrase&ntilde;a">                                                                                                             
                    </form>     
                <br/>
                <?php
					if(isset($_GET['m'])){														
						$resultado=$_GET['m'];
						if($resultado=="F"){
							echo "<p style='font-size:18px; color:#F00; text-align:center;'>No se pudo efectuar correctamente el cambio de contrase&ntilde;a, intentelo nuevamente.</p>";
						}
						if($resultado=="F2"){
							echo "<p style='font-size:18px; color:#F00; text-align:center;'>Su contrase&ntilde;a actual no es la correcta.</p>";
						}
						if($resultado=="T"){
							echo "<p style='font-size:18px; color:#F00; text-align:center;'>Se cambio correctamente la contrase&ntilde;a.</p>";
						}
					}
				?>
                <br/><br/><br/><br/><br/><br/>
                </article>
            </section>
            </div>s
        </div>
        <div class="clear"></div>
        <footer class="pie">
            <p>&copy; 2012 SOLUCITI.  All rights reserved</p>
		<p><a href="#">Terms Of Use</a>   |   <a href="#">Privacy Policy</a></p>
        </footer>
	</div>
</body>
</html>